<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // function a(){
          

        //     function b(){
           
        //         function c(){
        //             abc=20;
        //         }

        //         c();     console.log(abc);
        //     }b();  console.log(abc);

        // }a();console.log(abc);
        
        // 递归函数求后值等于=前两值和,且前两位数为1
function fu(sum){
    if(sum==1||sum==2){
        return 1;
    }
    return fu(sum-1)+fu(sum-2);
}
var res=fu(5);
console.log(res);
        
    </script>
</body>
</html>